import React from 'react';
import { Button, Result } from 'antd';
import {useSelector} from 'react-redux'
import {Navigate} from 'react-router-dom'

export default ()=>{
    const state=useSelector(state=>state)
    const token=state.adminModule.token
    if(!token){
        return <Navigate to={"/login"}></Navigate>
    }
    return (<>
         <Result
            status="404"
            title="404"
            subTitle="Sorry, the page you visited does not exist."
            extra={<Button type="primary">Back Home</Button>}
        />
    </>)
}